package de.htwsaar.smog.dao;

import java.util.List;

import de.htwsaar.smog.model.Measurement;

/**
 * @author	Thomas Schoenfeld
 * @date	2015-02-14
 * @version	20150214_01
 * 
 * Interface MeasurementService for Entity Manager class MongoDBMeasurementService
 *
 * As it turned out, we do not need this interface because the interface "MeasurementRepository" also does the job.
 */
public interface MeasurementService {
	
	/**
	 * Finds a measurement by its id.
	 * 
	 * @param id		id of the searched measurement 
	 * @return			the searched measurement
	 */
	Measurement findById(String id);
	
	/**
	 * Finds all measurements of a certain sensor id.
	 * 
	 * @param sensorId	searched sensor id
	 * @return			measurements of the searched sensor id
	 */
	List<Measurement> findBySensorId(String sensorId);
	
	/**
	 * Finds all measurements of a certain location.
	 * 
	 * @param location	searched location
	 * @return			measurements of the searched location
	 */
	List<Measurement> findByLocation(String location);
	
	/**
	 * Finds all measurements within a certain longitude.
	 * 
	 * @param longitude	searched longitude
	 * @return			measurements of the searched longitude
	 */
	List<Measurement> findByLongitude(String longitude);		
	
	/**
	 * Finds all measurements within a certain latitude.
	 * 
	 * @param latitude	searched latitude
	 * @return			measurements of the searched latitude
	 */
	List<Measurement> findByLatitude(String latitude);
	
	/**
	 * Finds all measurements of a certain measurement unit
	 * 
	 * @param type		searched measurement unit
	 * @return			measurements of the searched measurement unit
	 */
	List<Measurement> findByType(String type);
	
	/**
	 * Finds all measurements within a certain time.
	 * 
	 * @param time		searched time
	 * @return			measurements of the searched time
	 */
	List<Measurement> findByTime(String time);
	
	/**
	 * Finds all measurements with a certain value.
	 * 
	 * @param value		searched value
	 * @return			measurements of the searched value
	 */
	List<Measurement> findByValue(int value);
		
	/**
	 * Provides all measurements inside the database.
	 * 
	 * @return			all measurements inside the database
	 */
	List<Measurement> findAll();	

}
